<?php
include '../../auth/ceklogin.php';
include '../../sql/conn.php';
$id=$_REQUEST['id'];
$text=$_REQUEST['text'];
$idCustomer=$_REQUEST['idCustomer'];
$attn=$_REQUEST['telp'];
$telp=$_REQUEST['attn'];
$fax=$_REQUEST['fax'];
$desc=$_REQUEST['desc'];
$query=mysql_query("
UPDATE
        `bukakainti`.`inquiry` 
SET  
        `text` = '$text',
        `idCustomer` = '$idCustomer',
        `attn` = '$attn',
        `telp` = '$telp',
        `fax` = '$fax',
        `desc` = '$desc',
        `chgby` =  '$_SESSION[userbkknt]',
        `chgdate` =  'now()'
WHERE 
        CONCAT(  `inquiry`.`id` ) ='$id' 
LIMIT 1
");
if($query){
    echo json_encode(array('success'=>true,'msg'=>'Inquiry with Number : '.$no.' successfully updated.'));
} else {
    echo json_encode(array('msg'=>'Error Occured. '.  mysql_error()));
}
?>